package com.sg.tr.task;

import java.util.TimerTask;

import org.apache.log4j.Logger;

import com.sg.common.dao.BaseDao;
import com.sg.common.empty.service.TableBeanService;
import com.sg.common.task.AbsTimerTask;
import com.sg.common.task.ConfFlashTask;
import com.sg.tr.service.TrMobService;
import com.sg.tr.web.TrMobController;

public class TrMobTask extends AbsTimerTask{
	private Logger log = Logger.getLogger(ConfFlashTask.class);
	@Override
	public TimerTask createTimerTask() {
		// TODO Auto-generated method stub
		return new TimerTask() {
			
			@Override
			public void run() {
				
				TableBeanService tbservice = (TableBeanService) ctx
						.getBean("tableBeanService");
				tbservice.flush("trResum");
				
				TrMobService tmService = (TrMobService) ctx.getBean("trMobService");	
				log.info("更新人员履历统计信息开始," + System.currentTimeMillis());
//				TrMobService tmService = new TrMobService();
				try {
					tmService.getCourseSta();
					log.info("更新人员履历统计信息结束," + System.currentTimeMillis());
				} catch (Exception e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
					log.info("更新人员履历统计出错,"+ e.getMessage());
				}
			}
		};
	}

	
	
}
